const moduleB ={
    namespaced:true,
    state:()=>({
        countB: 10
    }),
    getters:{
        doubleCountB(state){
            return state.countB *2
        }
    },
    mutations:{
        incrementB(state){
            state.countB++
        }
    },
    actions:{
        asyncIncrementB({commit}){
            commit('incrementB')
        },

        emitGlobalMut({commit}){
            commit("increment",{count:40},{root:true})
        },
        emitGlobalAct({dispatch}){
            commit("asyncIncrement",{count:50},{root:true})
        },
    }
}

export default moduleB